<!DOCTYPE html>
<html>
<head>
<title>新增试卷</title> <@h.head />
<style type="text/css">
body {
	padding-bottom: 40px;
}

.sidebar-nav {
	padding: 9px 0;
}

@media ( max-width : 980px) {
	/* Enable use of floated navbar text */
	.navbar-text.pull-right {
		float: none;
		padding-left: 5px;
		padding-right: 5px;
	}
}
</style>
</head>
<body>
	<form action="${path}/level/save-new-level" id="fm" method="post"
		class="definewidth m20">
		<div style="text-align: center;" id="errorMsg"></div>
		<table class="table table-bordered table-hover definewidth m10">
			<tr>
				<td width="10%" class="tableleft">等级名称<span class="required">*</span></td>
				<td><input type="text" name="name" datatype="*"
										nullmsg="请输入等级名称！" /> <span class="Validform_checktip">请输入等级名称！</span></td>
			</tr>
			<tr>
				<td class="tableleft">说明文字</td>
				<td>
					<input class="easyui-textbox" name="summary" style="height:60px" data-options="multiline:true">
				</td>
			</tr>
			<tr>
				<td class="tableleft">考试时间</td>
				<td><input type="text" class="easyui-datebox" name="examTimeStr"></td>
			</tr>
			<tr>
				<td class="tableleft">排序</td>
				<td><input type="text" name="showOrder" class="easyui-numberbox" value="1"/></td>
			</tr>
			<tr>
				<td class="tableleft"></td>
				<td>
					<button type="submit" class="btn btn-primary" type="button">保存</button>
					&nbsp;&nbsp;
					<button type="button" class="btn btn-success" onclick="goLevelList()">返回列表</button>
				</td>
			</tr>
		</table>
	</form>
	<@h.foot />
	<script type="text/javascript">
        function goLevelList() {
            window.location.href = "${path}/level/list";
        }
		var callback = function(data) {
			if (data.status == "0") {
				window.location.href = "${path}/level/list";
			} else {
				$("#errorMsg").html(data.msg).show();
			}
		}
		$("#fm").validFrom(callback);
	</script>
</body>
</html>